'use strict';

module.exports = app => {
  const { STRING, INTEGER } = app.Sequelize;
  const NoteDB = app.model.define('noteInfo', {
    id: {
      type: INTEGER, // 字段类型
      primaryKey: true, // 是否为主键
      allowNull: false, // 是否允许为空
      autoIncrement: true, // 是否为自增
    },
    // 简易定义类型，默认不能为空
    title: STRING,
    noteValueType: STRING,
    noteType: INTEGER,
    mainFigureAddress: STRING,
    noteContent: STRING(1024),
  }, {
    timestamps: true,
  });
  return NoteDB;
};
